package com.zebra.remoting.config;

import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.*;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class GWRTMSmessage extends ZebraBaseMessage<GWRTMSmessage> {

    private int serverId;

    @Override
    public void write(ByteBuf b) {
        writeInt(b, this.serverId);
    }

    @Override
    public GWRTMSmessage read(ByteBuf b) {
        GWRTMSmessage message = new GWRTMSmessage();
        message.setServerId(readInt(b));
        return message;
    }
}
